import java.util.Arrays;

/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2212 2213
 * @Package: PACKAGE_NAME
 * @File: ArraysTools.java
 * @Time: 2022/12/17 8:05
 * @Author: abcque
 * @Description:
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class ArraysTools {
    public static void main(String[] args) {
        int[] arr1 = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        int[] arr2 = {5, 2,4,1,3};

        Arrays.sort(arr2);

        String string = Arrays.toString(arr2);
        System.out.println(string);

        int i = Arrays.binarySearch(arr2, 2);
        System.out.println("index = " + i);
    }
}
